package servlet;

import javax.servlet.GenericServlet;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.annotation.WebServlet;
import java.io.IOException;

/**
 * @Author:石小俊
 * @Date:2022/12/12 10:16
 * @Version:1.0-SNAPSHOT
 * @Description:
 */
@WebServlet(urlPatterns = "/life2",loadOnStartup = 2)
public class LifeTwoServlet extends GenericServlet {

    @Override
    public void init() throws ServletException {
        System.out.println("这是GenericServlet子类的初始化方法");
    }

    @Override
    public void service(ServletRequest servletRequest, ServletResponse servletResponse) throws ServletException, IOException {
        System.out.println("LifeTwoServlet.service");
    }

    @Override
    public void destroy() {
        System.out.println("LifeTwoServlet.destroy");
    }
}
